package no.rmz.genetics;


/**
 * This is a sample genetic class. Its only test
 * is to try out the various mutation and combination
 * methods used during genetic programming.
 */
@Genetic class SampleGenome {

    /**
     * Override Object.toString(), mostly for debugging purposes.
     * @return a string describing this genome.
     */
    public final String toString() {
        return  "[SampleGenome state1 = "
        + getState1() + ", state2 = "
        + getState2() + "]";
    }

    /**
     * A number, some state. Doesn�t mean any thing.
     */
    private  Integer state1;

    /**
     * Even more state. Doesn�t mean anything this either.
     */
    private  Integer state2;


    /**
     * Necessary to have this kind of creator
     * for genetic objects.
     *
     */
    public SampleGenome() {

    }

    /**
     * Create a sample genome object.
     * @param inState1 first part of the state.
     * @param inState2 second part of the state.
     */
    public SampleGenome(
            final Integer inState1,
            final Integer inState2) {
        super();
        this.state1 = inState1;
        this.state2 = inState2;
    }

    /**
     * Get some state.
     * @return The state.
     */
    @Gene public Integer getState1() {
        return state1;
    }

    /**
     * Set some state.
     * @param inState1 state value
     */
    @Gene public void setState1(final Integer inState1) {
        this.state1 = inState1;
    }

    /**
     * Get even more state.
     * @return the state value
     */
    @Gene public Integer getState2() {
        return state2;
    }

    /**
     * Set even more state.
     * @param inState2 the state value
     */
    @Gene public void setState2(final Integer inState2) {
        this.state2 = inState2;
    }
}
